<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Spring Boot Contacts</title>
    <link rel="stylesheet" th:href="@{/style.css}"/>

</head>
<body>
<h2>Spring Boot Contacts</h2>
<form method="post">
    <label for="firstName">First Name:</label>
    <input type="text" name="firstName"/> <br/>
    <label for="lastName">Last Name:</label>
    <input type="text" name="lastName"/> <br/>
    <label for="phoneNumber">Phone #:</label>
    <input type="text" name="phoneNumber"/> <br/>
    <label for="emailAddress">Email:</label>
    <input type="text" name="emailAddress"/> <br/>
    <input type="submit"/>
</form>
<ul th:each="contact : ${contacts}">
    <li>
        <span th:text="${contact.firstName}">Fist</span>
        <span th:text="${contact.lastName}">Last</span> :
        <span th:text="${contact.phoneNumber}">phoneNumber</span>,
        <span th:text="${contact.emailAddress}">emailAddress</span>
    </li>
</ul>
</body>
</html>